package com.colin.aiyi.adapter;


import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.colin.aiyi.R;
import com.colin.aiyi.app.Constant;
import com.colin.aiyi.entity.SayDetail;
import com.colin.aiyi.entity.YiJuAndYiShuoEntity;
import com.colin.aiyi.utils.MusicUtil;

import java.util.List;


public class PingLunAdapter extends BaseQuickAdapter<SayDetail.DataBean.RecommendListBean,BaseViewHolder> {

    private Context context;

    public PingLunAdapter(List<SayDetail.DataBean.RecommendListBean> list) {
        super(R.layout.item_pinglun, list);
       // this.context = context;
    }



    @Override
    protected void convert(BaseViewHolder helper, SayDetail.DataBean.RecommendListBean item) {
        ImageView img_head=helper.getView(R.id.img_head);
        Glide.with(img_head.getContext()).load(Constant.BASE_URL+item.getUrl()).into(img_head);
        helper.setText(R.id.text_title,item.getTitle());
        helper.setText(R.id.text_time,item.getUpdatedDate()+"");
        helper.setText(R.id. text_decs,item.getContent().replace("\\n","").replace("\\r",""));
    }


}
